package com.woniuxy.woniumall.mapper;

import com.woniuxy.woniumall.entity.Cart;
import com.woniuxy.woniumall.vo.CartVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface CartMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    Cart selectByPrimaryKey(Integer id);

    List<Cart> selectAll();

    int updateByPrimaryKey(Cart record);

    Cart isCollected(@Param("bookId") int bookId, @Param("userId") int userId);

    List<CartVo> selectMyCart(Integer id);

    List<CartVo> selectSubmitCart(@Param("userid") Integer id, @Param("ids") Integer[] ids);
}